#include<iostream>
#include<string>
using namespace std;

string solve(string str) {
    if (str.empty()) return str;
    string res;
    for (auto it = str.rbegin(); it != str.rend(); it++)
        res.push_back(*it);
    return res;
}

